package com.game.utils;

import com.game.config.Config;


/**
* @author oven:
* @version 创建时间：2012-10-30 下午3:53:56
* 
*/
public class SpeedUtil {
	
	/**
	 * 传入帧数
	 * @param value
	 * @return
	 */
	public static float getCountSpeed(float fpsValue){
		return fpsValue*(Config.FPS/Config.DEF_FPS);
	}
	
	/**
	 * 传入位移值
	 * @param value
	 * @return
	 */
	public static float getSpeed(float transformValue){
		return transformValue*(Config.DEF_FPS/Config.FPS);
	}
	
	public static float getTimeWithFPSCount(int count){
		return Config.FPS;
	}
	
	public static float getTimeWithMillSecond(int millSecond){
		return getTimeWithSecond(millSecond/1000);
	}
	
	public static float getTimeWithSecond(float second){
		return second*Config.FPS;
	}
}

